{{define "navbar"}}

	<!--> 导航栏 <-->
	<div class="navbar navbar-fixed-top navbar-inverse" role="navigation">
		   <div class="container">
		      <div class="navbar-header">

		         <button type="button" class="navbar-toggle" data-toggle="collapse" 
		           data-target=".navbar-collaspe">
		              <span class="sr-only"> Toggle navigation</span>
		              <span class="icon-bar"></span>
		              <span class="icon-bar"></span>
		              <span class="icon-bar"></span>
		           </button>
		     		
		           <a class="navbar-brand" href="/">
		           	<span class="glyphicon glyphicon-home"> lianxm </span>	
		        	</a>
		      </div>

		      <div class="collapse navbar-collapse" style="float: right;">

		      	{{if .Cookie}}
		      	<ul class="nav navbar-nav">
		      		<li class="dropdown">
		      			<a href="#" class="dropdown-toggle " data-toggle="dropdown">
		      				<span class="glyphicon glyphicon-plus"></span>
		      				新建
		      			<span class="caret"></span>
		      			</a>
		      			<ul class="dropdown-menu">
		      				<li> <a href="/topic/add">文章</a></li>
		      				<li> <a href="/fenlei">分类</a></li>
		      			</ul>
		      		</li>
		      	</ul>
		      	{{end}}
 		         <ul class="nav navbar-nav">
					<!--
		            <li class="dropdown">
		               <a href="#shop" class="dropdown-toggle" data-toggle="dropdown">
		               <span class="glyphicon glyphicon-flag"></span>
		              		 Acm <b class="caret"></b>
		               </a>
		               <ul class="dropdown-menu">
		               		<li><a href="#">数论</a></li>
		               	    <li role="presentation" class="divider"></li>
		               		<li><a href="#">图论</a></li>
		               		<li role="presentation" class="divider"></li>
		               		<li><a href="#">字符串</a></li>
		               	    <li role="presentation" class="divider"></li>
		               		<li><a href="#">计算几何</a></li>

		               </ul>
		            </li>
					
		            <li>
		               <a href="#support">
		                <span class="glyphicon glyphicon-fire"></span>
		              		 C++
		               </a>
		            </li>
		            <li>

		               <a href="#support">
		               <span class="glyphicon glyphicon-cog"></span>
		             	  Go
		               </a>
		            </li>	
		            -->
		            {{range .fenlei}}
		            <li>
		            	{{if .IsAddnav}}
		            	 	<a href="/fenlei/query?id={{.Id}}">
		            	 		<span class={{.TuBiao}}></span>
		            	 		{{.Title}} 
		            	 	</a>
		            	 {{end}}
		            </li>
		            {{end}}

				
		         </ul>

		       </div>
		   </div>
	 </div>
{{end}}